//<script type="text/javascript">
window.GenCode = function (elem) {

var url = "./modules/CGen/generator.php?"+elem.getElementsByTagName("input")[0].name+"="+elem.getElementsByTagName("input")[0].value;

for (var i=1;i<elem.getElementsByTagName("input").length;i++)
{
	if (elem.getElementsByTagName("input")[i].type != "checkbox")
	{
		url += "&"+elem.getElementsByTagName("input")[i].name+"="+elem.getElementsByTagName("input")[i].value;
	}
	else if (elem.getElementsByTagName("input")[i].checked)
	{
		url += "&"+elem.getElementsByTagName("input")[i].name+"=1";
	}
	else
	{
		url += "&"+elem.getElementsByTagName("input")[i].name+"=0";
	}
}

return ajaxinclude(url);

}
//</script>